Skip to content

Conversation

@empovit
Copy link
Member

@empovit empovit commented Dec 26, 2025

Provides build, lint, type-check, i18n targets that run inside containers
via Dockerfile.dev - no Node.js required on host. Includes container image
and Helm deployment targets.

Summary by CodeRabbit

  • Chores
    • Added a dedicated Node.js 20 development image and tooling to support containerized local development.
    • Introduced a comprehensive Makefile to standardize build, test, lint, type-check, i18n, lockfile regen, image build/push, and Helm deploy/undeploy workflows.
    • Included dev-image build, automatic container runtime detection, colorized help, usage examples, and host prerequisites.

✏️ Tip: You can customize this high-level summary in your review settings.

@openshift-ci
Copy link

openshift-ci bot commented Dec 26, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: empovit

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai
Copy link

coderabbitai bot commented Jan 18, 2026

Walkthrough

Adds a new Dockerfile.dev (Red Hat UBI9 Node.js 20, installs yarn, WORKDIR /workspace) and a new Makefile that orchestrates containerized development tasks, image build/push, and Helm lint/deploy/undeploy workflows using a DEV_IMAGE and a chosen container tool.

Changes

Cohort / File(s) Summary
Docker Development Configuration
Dockerfile.dev
New development Dockerfile: base registry.access.redhat.com/ubi9/nodejs-20:latest, switches to root, installs yarn globally via npm i -g yarn, sets WORKDIR /workspace.
Build & Deployment Orchestration
Makefile
New Makefile introducing variables (REGISTRY, IMAGE_NAME, IMAGE_TAG, NAMESPACE, RELEASE_NAME, CONTAINER_TOOL, DEV_IMAGE), color constants, and public targets: help, build-dev-image, build, lint, type-check, i18n, clean, update-lockfile, build-image, push-image, helm-lint, deploy, undeploy. Detects podman/docker and runs JS/TS tasks inside the dev image; includes containerized build/push and Helm workflows.

Sequence Diagram(s)

mermaid
sequenceDiagram
rect rgba(0,102,204,0.5)
participant Dev as Developer (CLI)
end
rect rgba(0,153,51,0.5)
participant MF as Makefile
end
rect rgba(204,153,0,0.5)
participant CT as Container Tool (podman/docker)
end
rect rgba(153,51,153,0.5)
participant DI as Dev Image (DEV_IMAGE)
end
rect rgba(204,51,51,0.5)
participant Reg as Container Registry
end
rect rgba(51,102,153,0.5)
participant Helm as Helm
end
rect rgba(102,51,0,0.5)
participant K8s as Kubernetes Cluster
end

Dev->>MF: invoke target (e.g., build, lint, deploy)
MF->>CT: run command inside container tool
CT->>DI: start/execute tasks in DEV_IMAGE (lint, build, type-check, update-lockfile)
alt image build/push flow
    MF->>CT: build image (local)
    CT->>Reg: push image -> REGISTRY/IMAGE:TAG
end
alt helm deploy flow
    MF->>Helm: helm upgrade --install (with image settings)
    Helm->>K8s: apply chart -> deploy release
end

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change—adding a Makefile with containerized build support—which is the main focus of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@empovit empovit changed the title [WIP] Add Makefile for build and deployment automation [WIP] Add Makefile with containerized builds Jan 18, 2026
@empovit empovit changed the title [WIP] Add Makefile with containerized builds Add Makefile with containerized builds Jan 19, 2026
@empovit
Copy link
Member Author

empovit commented Jan 19, 2026

@openshift-ci openshift-ci bot requested review from MarkusGersdorf, TomerNewman and yakovbeder and removed request for fabiendupont and mresvanis January 19, 2026 10:48
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@Makefile`:
- Around line 116-121: The deploy target's helm command (in the Makefile target
named "deploy") should include the --create-namespace flag so fresh clusters
succeed when the namespace (NAMESPACE) does not exist; update the helm upgrade
--install invocation that uses $(RELEASE_NAME), $(NAMESPACE),
$(REGISTRY)/$(IMAGE_NAME) and $(IMAGE_TAG) to add --create-namespace so the
namespace is created automatically on first deploy.
🧹 Nitpick comments (1)
Makefile (1)

53-83: Avoid root-owned artifacts from container runs.

Running as root inside the dev image can leave root-owned files (e.g., dist/, cache, lockfiles) on the host, which is a common source of permission friction. Consider mapping the container user to the host UID/GID and setting a writable HOME.

🔧 Suggested change (apply to build/lint/type-check/i18n)
 build: ## Build plugin for production
 	`@echo` "$(GREEN)Building plugin (containerized)...$(RESET)"
 	@$(CONTAINER_TOOL) run --rm \
 		-v "$(CURDIR):/workspace:z" \
 		-w /workspace \
+		--user $(shell id -u):$(shell id -g) \
+		-e HOME=/tmp \
 		$(DEV_IMAGE) \
 		sh -c "yarn install --frozen-lockfile && yarn build"

 lint: ## Lint the code
 	`@echo` "$(GREEN)Linting code (containerized)...$(RESET)"
 	@$(CONTAINER_TOOL) run --rm \
 		-v "$(CURDIR):/workspace:z" \
 		-w /workspace \
+		--user $(shell id -u):$(shell id -g) \
+		-e HOME=/tmp \
 		$(DEV_IMAGE) \
 		sh -c "yarn install --frozen-lockfile && yarn lint"

 type-check: ## Check TypeScript types
 	`@echo` "$(GREEN)Type checking (containerized)...$(RESET)"
 	@$(CONTAINER_TOOL) run --rm \
 		-v "$(CURDIR):/workspace:z" \
 		-w /workspace \
+		--user $(shell id -u):$(shell id -g) \
+		-e HOME=/tmp \
 		$(DEV_IMAGE) \
 		sh -c "yarn install --frozen-lockfile && yarn type-check"

 i18n: ## Generate i18n translations
 	`@echo` "$(GREEN)Generating i18n (containerized)...$(RESET)"
 	@$(CONTAINER_TOOL) run --rm \
 		-v "$(CURDIR):/workspace:z" \
 		-w /workspace \
+		--user $(shell id -u):$(shell id -g) \
+		-e HOME=/tmp \
 		$(DEV_IMAGE) \
 		sh -c "yarn install --frozen-lockfile && yarn i18n"

@empovit empovit changed the title Add Makefile with containerized builds [WIP] Add Makefile with containerized builds Jan 19, 2026
@empovit empovit changed the title [WIP] Add Makefile with containerized builds Add Makefile with containerized builds Jan 19, 2026
Provides build, lint, type-check, i18n targets that run inside containers
via Dockerfile.dev - no Node.js required on host. Includes container image
and Helm deployment targets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant